home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************************/
- /* */
- /* init.c - Driver initialization. */
- /* */
- /* Richard W. Mincher. February 19, 1990. */
- /* */
- /* Copyright © 1990, Apple Computer, Inc. All rights reserved. */
- /* */
- /********************************************************************************/
-
- #include "AROSE.h"
- #include "os.h"
- #include "managers.h"
-
- #include "ARDriver.h"
- #include "ARTask.h"
-
- InitTask()
- {
- extern int _tbeint(), _escint(), _rcaint(), _srcint();
- short s;
-
- open = 0;
-
- if (Register_Task( PORTNAME, "SCC", 1) == 0)
- return;
- #ifdef DEBUG
- printf("Port %s registered.\n", PORTNAME);
- #endif DEBUG
-
- SaveA5();
-
- s = Spl(7);
- *SCCControl = 0x09;
- #ifdef PORTA
- *SCCControl = 0x80;
- #endif
- #ifdef PORTB
- *SCCControl = 0x40;
- #endif
-
- *SCCControl = 0x02;
- #ifdef SCC2
- *SCCControl = 0x50;
- #endif
- #ifdef SCC1
- *SCCControl = 0x40;
- #endif
- (void)Spl(s);
-
- *(long *)(VS_TBE) = _tbeint;
- *(long *)(VS_ESC) = _escint;
- *(long *)(VS_RCA) = _rcaint;
- *(long *)(VS_SRC) = _srcint;
-
- open = 1;
- }
-
-